#pragma warning(disable:4996)
#pragma warning(disable:6031)
#pragma warning(disable:6011)

namespace Y190626_reverse_a_list {
int main();

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

int stk[10];
int top = -1;
int pop();
void push(int);

int pop() {
	return (stk[top--]);
}

void push(int val) {
	stk[++top] = val;
}

int main() {
	int val, n, i;
	int arr[10];
	printf("\n Enter the number of elements in the array : ");
	scanf("%d", &n);
	printf("\n Enter the elements of the array : ");
	for (i = 0; i < n; i++)
		scanf("%d", &arr[i]);
	for (i = 0; i < n; i++)
		push(arr[i]);
	for (i = 0; i < n; i++)
	{
		val = pop();
		arr[i] = val;
	}
	printf("\n The reversed array is : ");
	for (i = 0; i < n; i++)
		printf(" %d", arr[i]);
	return 0;
}

}

int main_Y190626_reverse_a_list()
{
	return Y190626_reverse_a_list::main();
}